package com.cet.designpatterns.builder.improvement;

/**
 * @program: algorithm
 * @description: 客户端
 * @author: 陈恩涛
 * @create: 2021-09-07 09:35
 **/
public class Client {
    public static void main(String[] args) {

        //盖普通房子
        CommonHouseBuilder commonHouseBuilder = new CommonHouseBuilder();
        Director director = new Director(commonHouseBuilder);
        House commonHouse = director.constructHouse();
        System.out.println(commonHouse);

        //盖高楼
        HighBuildingBuilder highBuildingBuilder = new HighBuildingBuilder();
        director.setBuilder(highBuildingBuilder);
        House highBuilding = director.constructHouse();
        System.out.println(highBuilding);
    }
}
